package com.zhuss.product.train;

import com.zhuss.bean.bo.product.train.CreateLineStrategyBo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.zhuss.bean.bo.product.train.DetailLineStrategyBo;
import com.zhuss.bean.bo.product.train.SearchLineStrategyBo;
import com.zhuss.common.ReadService;
import com.zhuss.product.processor.LineStrategyRead;
import com.zhuss.exception.DzcxException;

/**
 * @description: 线路策略查询Service
 * @author: zhushanshuo
 * @create: Mon Jan 04 09:51:07 CST 2021
 **/
@Component("lineStrategyReadService")
public class LineStrategyReadService implements ReadService<Object, Object> {

	@Autowired
	@Qualifier("lineStrategyRead")
	private LineStrategyRead lineStrategyRead;

	/**
	 * 详情
	 */
	@Override
	public Object detail(Object param) throws DzcxException {
		DetailLineStrategyBo bo = (DetailLineStrategyBo) param;
		Long lineStrategyId = bo.getLineStrategyId();
		Object vo = lineStrategyRead.detail(lineStrategyId);
		return vo;
	}

	/**
	 * 列表
	 */
	@Override
	public Object list(Object param) {
		SearchLineStrategyBo bo = (SearchLineStrategyBo) param;
		Object result = lineStrategyRead.list(bo);
		return result;
	}

	public Object checkTrain(CreateLineStrategyBo bo) throws DzcxException {
		Object result = lineStrategyRead.checkTrain(bo);
		return result;
	}

	public Object getSiteList(DetailLineStrategyBo bo) throws DzcxException {
		Object result = lineStrategyRead.getSiteList(bo);
		return result;
	}

	/**
	 * 新线招募列表
	 * @return
	 * @throws DzcxException
	 */
	public Object newLineList(SearchLineStrategyBo bo) throws DzcxException {
		Object result = lineStrategyRead.newLineList(bo);
		return result;
	}

}

